//
//  ViewController.m
//  单列模式
//
//  Created by student on 16/3/23.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewController.h"
#import "Student.h"
#import "Teacher.h"

@interface ViewController ()


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.]
    
    
    Student *stu3 = [[Student alloc] init];
    stu3.name = @"李四";
    NSLog(@"%@:%@",stu3,stu3.name);
    
    
    Student *stu4 = [[Student alloc] init];
    NSLog(@"%@:%@",stu4,stu4.name);
    
    Student *stu5 = [[Student alloc] init];
    NSLog(@"%@:%@",stu5,stu5.name);
    
    Teacher *teacher1 = [Teacher shareTeacher];
    Teacher *teacher2 = [[Teacher alloc] init];
    NSLog(@"%@,%@",teacher1,teacher2);
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
